package com.wang.code;

import java.util.TreeSet;
public class _9TreeSetMethodTest {

	public static void main(String[] args) {
		TreeSet set = new TreeSet();
		set.add(0);
		set.add(1);
		set.add(2);
		set.add(3);
		set.add(5);
		set.add(6);
		
		Object ceiling = set.ceiling(4);
		System.out.println(ceiling);
		
		Object floor = set.floor(4);
		System.out.println(floor);
		Object first = set.first();
		System.out.println(first);
		Object lower = set.lower(0);
		System.out.println(lower);
		Object pollFirst = set.pollFirst();  
		System.out.println(pollFirst);
	}

}
